package com.tom.architect.day16.simple1;

/**
 * Added by Tom on 2023/12/15.
 * 静态代理。
 * 银行业务员-- 代理对象
 */
public class BankWorker implements IBank {
    private IBank bank;

    // 持有被代理的对象，
    public BankWorker(IBank bank) {
        this.bank = bank;
    }

    @Override
    public void applyBank() {
        System.out.println("开始受理业务");
        bank.applyBank();
        System.out.println("结束受理业务");
    }

    @Override
    public void lostBank() {

    }
}
